<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>HelloWorld</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Vue.extend 扩展实例构造器</h1>
    <hr>
    <author></author>
    <div id="author"></div>
    <script type="text/javascript">
        var authorURL = Vue.extend({
            template:"<p><a :href='authorURL'>{{authorName}}</a></p>",
            data:function(){
                return {
                    authorName:'JSPang',
                    authorURL: "http://weibo.com/hadelababy"
                }
            }
        })

        //所有的扩展都需要加载才可以使用.
        //.mount可以绑定#id,.class
        new authorURL().$mount('#author');
        new authorURL().$mount('author');
       
    </script>
</body>
</html>